import request from '@/utils/request'

const reviewApi = {
  menu_finds: '/frontend/ProjectType/menu_finds',
  table_header: '/frontend/Project/finds',
  detail_finds: '/frontend/Project/detail',
  detail_edit: '/frontend/Project/valueEdit',
  add_label: '/frontend/ProjectType/createDetail',
  add_data: '/frontend/Project/create',
  project_status: '/frontend/Project/edit',
  ask_table: '/frontend/Project/projectFinds', // 申报台账页table获取
  upload_file: '/frontend/uploadFile/uploadFile',
  getreview_type: 'frontend/review_major_types/finds',
  sendreview_type: 'frontend/review_definition/create',
  add_Form: '/frontend/ProjectType/save_add', // 新增保存按钮
  getValue: '/frontend/ProjectType/getValue' //获取申报台账里的详情
}
// 获取树状菜单
export function menuFinds (parameter) {
  return request({
    url: reviewApi.menu_finds,
    method: 'get',
    params: parameter
  })
}
// 工程台账表头获取
export function workInfoTableHeader (parameter) {
  return request({
    url: reviewApi.table_header,
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/formdata;charset=UTF-8'
    }
  })
}
export function detailFinds (parameter) {
  return request({
    url: reviewApi.detail_finds,
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/formdata;charset=UTF-8'
    }
  })
}
export function detailEdit (parameter) {
  return request({
    url: reviewApi.detail_edit,
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/formdata;charset=UTF-8'
    }
  })
}
export function addLabel (parameter) {
  return request({
    url: reviewApi.add_label,
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/formdata;charset=UTF-8'
    }
  })
}
export function addData (parameter) {
  return request({
    url: reviewApi.add_data,
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/formdata;charset=UTF-8'
    }
  })
}
export function addForm (parameter) {
  return request({
    url: reviewApi.add_Form,
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/formdata;charset=UTF-8'
    }
  })
}
export function projectStatus (parameter) {
  return request({
    url: reviewApi.project_status,
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/formdata;charset=UTF-8'
    }
  })
}
export function askTable (parameter) {
  return request({
    url: reviewApi.ask_table,
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/formdata;charset=UTF-8'
    }
  })
}
export function uploadFiles (parameter) {
  return request({
    url: reviewApi.upload_file,
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/formdata;charset=UTF-8'
    }
  })
}
export function getreviewtype (parameter) {
  return request({
    url: reviewApi.getreview_type,
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/formdata;charset=UTF-8'
    }
  })
}
export function sendreviewtype (parameter) {
  return request({
    url: reviewApi.sendreview_type,
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/formdata;charset=UTF-8'
    }
  })
}
export function getValue (parameter) {
  return request({
    url: reviewApi.getValue,
    method: 'post',
    data: parameter,
    headers: {
      'Content-Type': 'application/formdata;charset=UTF-8'
    }
  })
}
